namespace GSN.Mail.Messages
{
    class GmailMessageBuilder : IMessageBuilder
    {
        private Atom.Core.AtomEntry entry = null;

        public GmailMessageBuilder(Atom.Core.AtomEntry entry)
        {
            this.entry = entry;
        }

        public void set(Message msg)
        {
            msg.from = string.Format("{0} <{1}>", entry.Author.Name, entry.Author.Email);
            msg.subject = entry.Title.Content;
            msg.messageId = entry.Id.ToString();
            msg.body = entry.Summary.Content;
        }
    }
}
